package cn.tedu._03vehicle.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

@Data
public class UserRegDTO {
    //@NotNull(message = "用户名不能为null")
    //@NotEmpty(message = "用户名不能为空字符串和null")
    //@NotBlank(message = "用户名不能为空白串和空字符串和null")
    //@Size(min = 6, max = 12, message = "用户名必须在6-12位之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5]{0,7}$|^[a-zA-Z]{0,14}$", message = "用户名不能超过7个汉字或14个英文字符")
    @ApiModelProperty(value = "用户名", required = true)
    private String username;
    @ApiModelProperty(value = "密码", required = true)
    private String password;

    @Email(message = "邮箱名不合法")
    @ApiModelProperty(value = "邮箱", required = true)
    private String email;
    @ApiModelProperty(value = "手机号", required = true)
    private String phone;
}
